// 多态
#include <iostream>

using namespace std;

class Base
{
public:
    void show(void)
    {
        cout << "基类的show" << endl;
    }
};

class Child:public Base
{
public:
    void show(void)
    {
        cout << "子类的show" << endl;
    }
};

int main(int argc, char **argv)
{
    Base *p = dynamic_cast<Base *>(new Child);
    p->show();

    Child *p1 = static_cast<Child *>(new Base);
    p1->show();



    return 0;
}